package com.cgq.pro.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cgq.base.service.impl.BaseServiceImpl;
import com.cgq.pro.dao.UserDao;
import com.cgq.pro.entity.User;
import com.cgq.pro.service.UserService;

/**
 * 业务层组件
 * 用户管理Service层实现类
 * @author chenkaile
 *
 */
@Service
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService {

	private UserDao userDao;
	
	@Autowired
	public void setUserDao(UserDao userDao) {
		this.baseDao=userDao;
		this.userDao=userDao;
	}

	public User findUserByNameAndPwd(User user) {
		return userDao.findUserByNameAndPwd(user);
	}

	public List<User> getAllRecords(int start, int pageSize,
			Map<String, String> map) {
		return userDao.getAllRecords(start, pageSize, map);
	}

	public int getTotal(Map<String, String> map) {
		return userDao.getTotal(map);
	}
	
}
